<template>
    <div class="profile">
        <m-sheet-group>
            <m-cell title="头像" value="修改" @click.native="goto('/profile/avatar')" is-link></m-cell>
            <m-cell title="用户名" :value="userInfo.realName === '' ? '未认证' : userInfo.realName"
                    @click.native="goto('/profile/name?type=real')" is-link></m-cell>
            <m-cell title="昵称" :value="userInfo.nickName === '' ? '未填写' : userInfo.nickName"
                    @click.native="goto('/profile/name?type=nick')" is-link></m-cell>
            <m-cell title="生日" :value="info.birthday | timeStampFormat('YYYY-MM-D')"
                    @click.native="interact.timePickerShow = !interact.timePickerShow" is-link></m-cell>
            <m-time-picker @update:show="val => interact.timePickerShow = val" :show="interact.timePickerShow"
                           @handlerComfirm="selectDay"/>
        </m-sheet-group>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                interact: {
                    timePickerShow: false
                },
                info: {
                    birthday: 775197285000
                }
            }
        },
        methods: {
            selectDay(e) {
                this.info.birthday = e.getTime();
            },
        }
    }
</script>

<style lang="less" scoped>
</style>
